snpkagg_vars <- c("rhs_snpk_incidentNOCRIMEL0",
                 "rhs_snpk_incidentNOCRIMEL1",     
                 "rhs_snpk_incidentNOCRIMEdumL0",
                 "rhs_snpk_incidentNOCRIMEdumL1",
                 "rhs_snpk_highincNOCRIMEdumL0",
                 "rhs_snpk_highincNOCRIMEdumL1",
                 "rhs_spikeNOCRIMEL0",
                 "rhs_snpk_incidenttotNOCRIMEL0",
                 "rhs_snpk_incidenttotNOCRIMEL1",
                 "rhs_snpk_killNOCRIMEL0",
                 "rhs_snpk_killNOCRIMEL1",             
                 "rhs_snpk_injNOCRIMEL0",
                 "rhs_snpk_injNOCRIMEL1",
                 "rhs_snpk_desbuildNOCRIMEL0",
                 "rhs_snpk_desbuildNOCRIMEL1")
snpk.categories <- c("ALL",
                     "resource",
                     "governance",
                     "election",
                     "identity",
                     "popjustice",
                     "police",
                     "crime",
                     "domestic",
                     "separatist",
                     "other")
snpk_vars <- c(snpkagg_vars,
              paste("rhs_snpk_incident",
                    rep(snpk.categories,
                        each=2),
                    c("L0", "L1"),
                    sep=""),
              paste("rhs_snpk_kill",
                    rep(snpk.categories,
                        each=2),
                    c("L0", "L1"),
                    sep=""),          
              paste("rhs_snpk_inj",
                    rep(snpk.categories,
                        each=2),
                    c("L0", "L1"),
                    sep=""),             
              paste("rhs_snpk_dambuild",
                    rep(snpk.categories,
                        each=2),
                    c("L0", "L1"),
                    sep=""),
              paste("rhs_snpk_desbuild",
                    rep(snpk.categories,
                        each=2),
                    c("L0", "L1"),
                    sep=""),
              "rhs_snpk_totactivepapersL0")

violence_vars <- c(snpk_vars,
                   "rhs_pds_stealL0",                
                  "rhs_pds_robberyL0",          
                  "rhs_pds_lootingL0",
                  "rhs_pds_thuggeryL0",             
                  "rhs_pds_arsonL0",
                  "rhs_pds_rapeL0",
                  "rhs_pds_murderL0",
                  "rhs_pds_fight_citL0",     
                  "rhs_pds_fight_secL0",
                  "rhs_pds_fight_studL0",
                  "rhs_pds_fight_tribeL0",
                  "rhs_pds_vilconfindicatorL3",
                  "rhs_pds_vilconfindicatorL0",
                  "rhs_pds_deathspercapL0",
                  "rhs_pds_injpercapL0", 
                  "rhs_pds_num_sec_postL0",
                  "rhs_pds_num_sec_postL3",
                  "rhs_pds_num_police_postL0",
                  "rhs_pds_num_police_postL3",
                  "rhs_pds_num_sec_officerL0",
                  "rhs_dis_terrorismCountL0",
                  "rhs_dis_terrorismDeathsL0",
                  "rhs_dis_terrorismCountL1",
                  "rhs_dis_terrorismDeathsL1",
                  "rhs_dis_unrestCountL0",
                  "rhs_dis_unrestDeathsL0",
                  "rhs_dis_unrestCountL1",
                  "rhs_dis_unrestDeathsL1")

religious_vars <- c("rhs_cns_relF","rhs_cns_relP",
                   "rhs_cns_muslimShare","rhs_cns_catholicShare",
                   "rhs_cns_protestantShare","rhs_cns_hinduShare","rhs_cns_buddhistShare","rhs_cns_confucianShare",
                   "rhs_cns_shrchristian",
                   "rhs_pds_any_pesantren")
ethnic_vars <- c("rhs_cns_ethF",
                 "rhs_cns_ethP",
                 "rhs_cns_ethS",
                 "rhs_cns_shrchinese",
                 "rhs_cns_shrarab",
                 "rhs_cns_interEthnicMarriage")
educ_vars <- c("rhs_cns_schoolyr",
               "rhs_cns_shrnoschool",
               "rhs_pds_educ_KinderL0",
               "rhs_pds_educ_KinderL3",
               "rhs_pds_educ_PriL0",
               "rhs_pds_educ_PriL3",
               "rhs_pds_educ_HighL0",
               "rhs_pds_educ_HighL3",
               "rhs_pds_educ_MadPedL0",
               "rhs_pds_educ_MadPedL3",
               "rhs_pds_educ_UniL0",
               "rhs_pds_educ_UniL3",
               "rhs_sns_inschoolL0", 
               "rhs_sns_inschoolL1",
               "rhs_sns_inschoolL2", 
               "rhs_sns_literate_latinL0",
               "rhs_sns_literate_latinL1", 
               "rhs_sns_literate_latinL2")
remoteness_vars <- c("rhs_cns_shrrural",
                     "rhs_cns_mainroad_elec",
                     "rhs_cns_access_by4wheel_allyr",
                     "rhs_gis_capdist",
                     "rhs_pds_disttobupati",
                     "rhs_pds_trans_bridge_dumL0",
                     "rhs_pds_trans_bridge_dumL3",
                     "rhs_pds_trans_busterm_dumL0", 
                     "rhs_pds_trans_busterm_dumL3",
                     "rhs_pds_trans_seaport_dumL0",
                     "rhs_pds_trans_seaport_dumL3",
                     "rhs_pds_landarea",
                     "rhs_pds_trans_plnlight_dumL0", 
                     "rhs_pds_trans_plnlight_dumL3",
                     "rhs_pds_trans_roadpass_dumL0",
                     "rhs_pds_trans_roadpass_dumL3")
demographics_vars <- c("rhs_cns_male",
                       "rhs_cns_married",
                       "rhs_cns_childshare",
                       "rhs_cns_youthshare", 
                       "rhs_sns_ageL0",
                       "rhs_sns_ageL1",
                       "rhs_sns_ageL2")
population_vars <- c("rhs_cns_pop",
                    "rhs_pds_populationL0",
                    "rhs_cns_numvillage",
                    "rhs_pds_populationL0D3",
                    "rhs_pds_numvillagesL0",
                    "rhs_pds_numvillagesL3"
)
health_vars <- c(paste(rep(paste("rhs_pds_sht_",
                                 c("hosp",
                                   "mathosp",
                                   "medpoly",
                                   "pusk",
                                   "pustu",
                                   "Doctor",
                                   "MidWife",
                                   "TradBirth"),
                                 sep=""),
                           each=2),
                       c("L0", "L3"),
                       sep=""),
                 paste(rep(paste("rhs_sns_",
                                 c("anyhealthprob0t5",
                                   "bigthealth0t5",
                                   "anyhealthprob6plus",
                                   "bigthealth6plus"),
                                 sep=""),
                           each=3),
                       c("L0", "L1", "L2"),
                       sep=""))
disaster_vars <- c("rhs_pds_mudslide5",
                  "rhs_pds_flood5",
                  "rhs_pds_earthquake5",
                  "rhs_pds_fire5",
                  "rhs_pds_other",
                  paste(rep(paste("rhs_dis_",
                                  c("abrasion",
                                    "diseaseoutbreak",
                                    "drought",
                                    "earthquake",
                                    "flood",
                                    "forestfire",
                                    "indaccident",
                                    "tornado",
                                    "transaccid",
                                    "tsunami",
                                    "volcano"),
                                  sep=""),
                            each=4),
                        c("CountL0", "CountL1", 
                          "DeathsL0", "DeathsL1"),
                  sep=""),
                  "rhs_dis_deathsL0", "rhs_dis_deathsL1", 
                  "rhs_dis_totdisastersL0", "rhs_dis_totdisastersL1")
disaster_vars <- disaster_vars[!(disaster_vars %in% c("rhs_dis_droughtDeathsL0",
                                                      "rhs_dis_droughtDeathsL1",
                                                      "rhs_dis_forestfireDeathsL0",
                                                      "rhs_dis_forestfireDeathsL1",
                                                      "rhs_dis_volcanoDeathsL0",
                                                      "rhs_dis_volcanoDeathsL1"))]

elections_vars <- c("rhs_elec_mainstream1999local","rhs_elec_extislamshare1999local","rhs_elec_voteF1999local",
                   "rhs_elec_voteP1999local","rhs_elec_votetotal1999local",   
                   "rhs_elec_kabelectionyear","rhs_elec_totvotesL0",            
                   "rhs_elec_mainstreamL0","rhs_elec_extislamshareL0",
                   "rhs_elec_voteFL0",
                   "rhs_elec_votePL0","rhs_elec_numpartiesL0")
geography_vars <- c("rhs_geo_AspectClN", "rhs_geo_AspectClE", "rhs_geo_AspectClS",
                   "rhs_geo_AspectClU", "rhs_geo_AspectClW", "rhs_geo_Elev30as", 
                   "rhs_geo_for2000", "rhs_geo_grs2000", "rhs_geo_rugged3", 
                   "rhs_geo_rugged5", "rhs_geo_rugged9", "rhs_geo_SlopesCl1",
                   "rhs_geo_SlopesCl2", "rhs_geo_SlopesCl3", "rhs_geo_SlopesCl4",
                   "rhs_geo_SlopesCl5", "rhs_geo_SlopesCl6", "rhs_geo_SlopesCl7",
                   "rhs_geo_SlopesCl8", "rhs_geo_sq1", "rhs_geo_sq2", "rhs_geo_sq3",
                   "rhs_geo_sq4", "rhs_geo_sq5", "rhs_geo_sq6", "rhs_geo_sq7",
                   "rhs_geo_t_oc", "rhs_geo_t_ece", "rhs_geo_t_esp", "rhs_geo_t_ph_h2o",
                   "rhs_geo_t_caso4", "rhs_geo_t_bs", "rhs_geo_texture1", "rhs_geo_texture2",
                   "rhs_geo_texture3", "rhs_geo_drainage1", "rhs_geo_drainage2",
                   "rhs_geo_drainage3", "rhs_geo_drainage4", "rhs_geo_drainage5", 
                   "rhs_geo_drainage6")

communication_vars <- c(paste(rep(paste("rhs_sns_",
                                        c("hastel",
                                          "hascel",
                                          "hascom",
                                          "accessedinternet"),
                                        sep=""),
                                  each=3),
                              c("L0", "L1", "L2"),
                              sep=""),
                        paste(rep(paste("rhs_pds_com_",
                                        c("numhh_tel",
                                          "pubtv_dum",
                                          "phnstall_dum",
                                          "postal_dum",
                                          "cell_strong_dum",
                                          "cell_weak_dum",
                                          "cell_tower_dum",
                                          "numhh_rad",
                                          "numhh_dish",
                                          "numhh_tv"),
                                        sep=""),
                                  each=2),
                              c("L0", "L3"),
                              sep=""))

mines_vars <-paste("rhs_mine_",
                   c("Bauxite",
                     "Coal",
                     "Gold",
                     "IronOre",
                     "Nickel",
                     "Tin",
                     "Zinc",
                     "Silver"),
                   "_dist",
                   sep="")
publicgoods_vars <- c("rhs_pds_market_perm",
                      paste(rep(paste("rhs_pds_fac_",
                                      c("SafeWater_dum",
                                        "Garbage_dum",
                                        "PubToilet_dum",
                                        "Cooking_dum",
                                        "hh_stelec",
                                        "hh_nstelec"),
                                      sep=""),
                                each=2),
                            c("L0", "L3"),
                            sep=""))
agvars_vars <- c("rhs_pds_irrigated",
                "rhs_cns_rice_mill_small",
                "rhs_cns_rice_mill_large",
                "rhs_agc_majcash_wt",
                "rhs_agc_cash_wt",
                "rhs_agc_food_wt",
                "rhs_cns_any_farm_hold",
                "rhs_cns_shareHHabove0p1Ha",
                "rhs_cns_rice_primary")
sectorshares_vars <- c("rhs_cns_trading",
                      "rhs_cns_selfemployed", 
                      "rhs_cns_agric",
                      "rhs_cns_services",
                      "rhs_cns_employer",
                      "rhs_cns_shrag",
                      "rhs_cns_shrforest",
                      "rhs_cns_shrind",
                      "rhs_cns_shrtrade",
                      "rhs_cns_shrserv",
                      "rhs_cns_shrtransport")
governmentfinance_vars <- c("rhs_cns_revenueTotal",
                           "rhs_cns_revenueVillage",
                           "rhs_cns_revenueTaxDesa",
                           "rhs_cns_revenueSocialOrgs",
                           "rhs_cns_revenueGotongRoyong",
                           "rhs_cns_revenueOther",
                           "rhs_cns_revenueGovt",
                           "rhs_cns_revenueCentGovt",
                           "rhs_cns_revenueProvGovt",
                           "rhs_cns_revenueKabGovt",
                           "rhs_cns_expendRoutine",
                           "rhs_cns_expendDevelopment",
                           "rhs_dpr_totalrevpcL0",
                           "rhs_dpr_totalrevpcL1",
                           "rhs_dpr_totalrevpcL2",
                           "rhs_dpr_ownrevpcL0",
                           "rhs_dpr_ownrevpcL1",
                           "rhs_dpr_ownrevpcL2")

output_vars <- c("rhs_agc_aggdpL0",
                "rhs_agc_aggdpL1",
                "rhs_lightsL0",
                "rhs_lightsL1",
                "rhs_cns_unemploy_rate",
                paste(rep(paste("rhs_",
                                c("dpr_totGDPpc",
                                  "dpr_agGDPpc",
                                  "sns_pcexp_med",
                                  "sns_pcexp_mean",
                                  "sns_unemp"),
                                sep=""),
                          each=3),
                      c("L0", "L1", "L2"),
                      sep=""))


distribution_vars <- paste(rep(paste("rhs_sns_",
                                    c("gini",
                                      "p0",
                                      "p1",
                                      "p2",
                                      "ineq9010",
                                      "ineq8020",
                                      "worked",
                                      "raskinrice"),
                                    sep=""),
                              each=3),
                          c("L0", "L1", "L2"),
                          sep="")
comshock_interaction_vars <- paste(rep(paste("rhs_shk_",
                                            c("cash_wtDln_price",
                                              "majcash_wtDln_price",
                                              "food_wtDln_price",
                                              "BauxiteShock",
                                              "CoalShock",
                                              "CopperShock",
                                              "GoldShock",
                                              "IronOreShock",
                                              "NickelShock",
                                              "TinShock",
                                              "ZincShock",
                                              "SilverShock"),
                                            sep=""),
                                      each=3),
                                  c("L0", "L1", "L2"),
                                  sep="")
commprice_vars <- paste(rep(paste("rhs_",
                                  c("avocado",
                                    "buffalolive",
                                    "cabbage",
                                    "carrot",
                                    "cashew",
                                    "cassava",
                                    "chickenlive",
                                    "chilipepper",
                                    "cocoa",
                                    "coffee",
                                    "cucumber",
                                    "eggplant",
                                    "greenbean",
                                    "groundnut",
                                    "maize",
                                    "mangoguavamangosteen",
                                    "oilpalmfruit",
                                    "orange",
                                    "papaya",
                                    "pepper",
                                    "potato",
                                    "rubber",
                                    "soybean",
                                    "sweetpotato",
                                    "tomato",
                                    "Bauxite",
                                    "Coal",
                                    "Copper",
                                    "Gold",
                                    "IronOre",
                                    "Nickel",
                                    "Tin",
                                    "Zinc",
                                    "Silver"),
                                  sep=""),
                            each=3),
                        c("_DlPL0", "_DlPL1", "_DlPL2"),
                        sep="")

comshock_vars <- c(comshock_interaction_vars,
                   commprice_vars)
comweight_vars <- c(mines_vars, 
                    "rhs_agc_majcash_wt",
                    "rhs_agc_cash_wt",
                    "rhs_agc_food_wt")
agvarsNoWeights_vars <- c("rhs_pds_irrigated",
                         "rhs_cns_rice_mill_small",
                         "rhs_cns_rice_mill_large",
                         "rhs_cns_any_farm_hold",
                         "rhs_cns_shareHHabove0p1Ha",
                         "rhs_cns_rice_primary")
comNoInt_vars <- c(commprice_vars,
                   comweight_vars)

comshockAll_vars <- c(comshock_vars, comweight_vars)
climateshock_vars <- c("rhs_tmp_TempDevL0",
                       "rhs_tmp_TempDevL1",
                       "rhs_tmp_TempDevL2",
                       "rhs_tmp_RainDevL0",
                       "rhs_tmp_RainDevL1",
                       "rhs_tmp_RainDevL2")
commhist_vars <- c("rhs_shk_cash_wtDln_price_sd",
                   "rhs_shk_food_wtDln_price_sd",
                   "rhs_shk_majcash_wtDln_price_sd")
climatehist_vars <- c("rhs_tmp_avRain",
                      "rhs_tmp_avTemp",
                      "rhs_tmp_sdRain",
                      "rhs_tmp_sdTemp")

# Make larger groups of variables
varying_vars <- c(governmentfinance_vars,
                  publicgoods_vars,
                  comshock_vars,
                  output_vars,
                  distribution_vars,
                  climateshock_vars,
                  disaster_vars,
                  elections_vars,
                  educ_vars,
                  demographics_vars,
                  health_vars,
                  communication_vars)
fixed_vars <- c(commhist_vars,
                mines_vars,
                agvars_vars,
                sectorshares_vars,
                climatehist_vars,
                religious_vars,
                ethnic_vars,
                remoteness_vars,
                geography_vars,
                population_vars)
full_vars <- c(violence_vars,
               varying_vars,
               fixed_vars)

table1 <- list(full = full_vars)
table3_pt1 <- list(onlyviolence = violence_vars,
                   violpop = c(population_vars,
                               violence_vars))
table3_pt2 <- list(noviolence = c(varying_vars,
                                  fixed_vars))
table3_pt3 <- list(fullvarying = varying_vars)
table3_pt4 <- list(fullfixed = fixed_vars)

table3 <- c(table3_pt1,
            table3_pt2,
            table3_pt3,
            table3_pt4)
table4 <- list(full = full_vars,
               onlyviolence = violence_vars,
               violpop = c(population_vars,
                           violence_vars),
               noviolence = c(varying_vars,
                              fixed_vars))
figures_1_2_annual <- list(disaster=c(population_vars,
                                      disaster_vars),  
                           comshock=c(population_vars,
                                      comshock_vars),  
                           climateshock=c(population_vars, climateshock_vars),
                           elections=c(population_vars, elections_vars),
                           governmentfinance=c(population_vars, governmentfinance_vars),
                           output=c(population_vars, output_vars),
                           distribution=c(population_vars, distribution_vars),
                           communication=c(population_vars, communication_vars))
figures_1_2_slow <- list(publicgoods=c(population_vars, publicgoods_vars),
                         demographics=c(population_vars, demographics_vars),
                         educ=c(population_vars, educ_vars),
                         health=c(population_vars, health_vars))

figures_1_2_fixed <- list(population=population_vars,
                          commhist=c(population_vars, commhist_vars),
                          mines=c(population_vars, mines_vars),
                          agvars=c(population_vars, agvars_vars),
                          sectorshares=c(population_vars, sectorshares_vars),
                          climatehist=c(population_vars, climatehist_vars),
                          religious=c(population_vars, religious_vars),
                          ethnic=c(population_vars, ethnic_vars),
                          remoteness=c(population_vars, remoteness_vars),
                          geography=c(population_vars, geography_vars)
                          )
figures_1_2 <- c(figures_1_2_fixed,
                 figures_1_2_slow,
                 figures_1_2_annual)

figure_1 = figures_1_2
figure_1_fixed = figures_1_2_fixed
figure_1_slow = figures_1_2_slow
figure_1_annual = figures_1_2_annual

figure_2 = figures_1_2

tableA2 = table1

tableA3_pt1 = table1
tableA3_pt2 = table3_pt1
tableA3_pt3 = table3_pt2
tableA3_pt4 = table3_pt3
tableA3_pt5 = table3_pt4

figure_A1_fixed = figures_1_2_fixed
figure_A1_slow = figures_1_2_slow
figure_A1_annual = figures_1_2_annual

tableA5 = list(snpkagg=snpkagg_vars,
             snpk=snpk_vars)

tableA7 = table1

figure_A3_fixed = figures_1_2_fixed
figure_A3_slow = figures_1_2_slow
figure_A3_annual = figures_1_2_annual

figure_A5 = list(comweight = c(population_vars,
                               comweight_vars),
                 comprice = c(population_vars, 
                              commprice_vars),
                 comshockAll = c(population_vars,
                                 comshockAll_vars)
                 )
shock_breakdown <- c('comweight',
                     'comprice',
                     'comshock',
                     'comshockAll')
  
labels = c(publicgoods = "Public Goods",
           sectorshares = "Sector Share",
           mines = "Distance to Mines",
           agvars = "Agricultural Features",
           governmentfinance = "Government Finance",
           output = "Output",
           distribution = "Distributional Measures",
           comshock = "Commodity Shocks",
           climateshock = "Weather Shocks",    
           commhist = "Commodity Volatility",
           climatehist = "Weather History",
           religious = "Religion",
           ethnic = "Ethnicity",
           educ = "Education",
           communication = "Communication",
           remoteness = "Remoteness",
           geography = "Geography",
           demographics = "Demographics",
           health = "Health Care",
           disaster = "Natural Disasters",
           elections = "Electoral",
           price = "Comm Prices",
           comshockAll = "Comm Prices, Wts, and Ints",
           agvarsNoWeights = "Agricultural Measures",
           comweights = "Commodity Price Weights",
           comshockavg ="Commodities with MAs",
           climateshockavg = "Weather with MAs")

labels_A5 = c(publicgoods = "Public Goods",
           sectorshares = "Sector Share",
           mines = "Distance to Mines",
           agvars = "Agricultural Features",
           governmentfinance = "Government Finance",
           output = "Output",
           distribution = "Distributional Measures",
           comshock = "Commodity Shocks",
           climateshock = "Weather Shocks",    
           commhist = "Commodity Volatility",
           climatehist = "Weather History",
           religious = "Religion",
           ethnic = "Ethnicity",
           educ = "Education",
           communication = "Communication",
           remoteness = "Remoteness",
           geography = "Geography",
           demographics = "Demographics",
           health = "Health Care",
           disaster = "Natural Disasters",
           elections = "Electoral",
           comprice = "Comm Prices",
           comshockAll = "Comm Prices, Wts, and Ints",
           agvarsNoWeights = "Agricultural Measures",
           comweight = "Commodity Price Weights",
           comshockavg ="Commodities with MAs",
           climateshockavg = "Weather with MAs")

summary_categories <- list(govfin = governmentfinance_vars,
                           pubgood = publicgoods_vars,
                           comshock = comshock_vars,
                           output = output_vars,
                           distribution = distribution_vars,
                           climateshock = climateshock_vars,
                           disaster = disaster_vars,
                           elections = elections_vars,
                           educ = educ_vars,
                           demo = demographics_vars,
                           health = health_vars,
                           comm = communication_vars,
                           commhist = commhist_vars,
                           mines = mines_vars,
                           agvars = agvars_vars,
                           sector = sectorshares_vars,
                           climatehist = climatehist_vars,
                           religious = religious_vars,
                           ethnic = ethnic_vars,
                           remote = remoteness_vars,
                           geo = geography_vars,
                           pop = population_vars,
                           snpk = snpk_vars,
                           dimviol = c("rhs_dis_terrorismCountL0",
                                       "rhs_dis_terrorismDeathsL0",
                                       "rhs_dis_terrorismCountL1",
                                       "rhs_dis_terrorismDeathsL1",
                                       "rhs_dis_unrestCountL0",
                                       "rhs_dis_unrestDeathsL0",
                                       "rhs_dis_unrestCountL1",
                                       "rhs_dis_unrestDeathsL1"),
                           podesviol = c("rhs_pds_stealL0",                
                                         "rhs_pds_robberyL0",          
                                         "rhs_pds_lootingL0",
                                         "rhs_pds_thuggeryL0",             
                                         "rhs_pds_arsonL0",
                                         "rhs_pds_rapeL0",
                                         "rhs_pds_murderL0",
                                         "rhs_pds_fight_citL0",     
                                         "rhs_pds_fight_secL0",
                                         "rhs_pds_fight_studL0",
                                         "rhs_pds_fight_tribeL0",
                                         "rhs_pds_vilconfindicatorL3",
                                         "rhs_pds_vilconfindicatorL0",
                                         "rhs_pds_deathspercapL0",
                                         "rhs_pds_injpercapL0", 
                                         "rhs_pds_num_sec_postL0",
                                         "rhs_pds_num_sec_postL3",
                                         "rhs_pds_num_police_postL0",
                                         "rhs_pds_num_police_postL3",
                                         "rhs_pds_num_sec_officerL0",
                                         "rhs_dis_terrorismCountL0",
                                         "rhs_dis_terrorismDeathsL0"))

if (length(full_vars[!(full_vars %in% colnames(dta))]) > 0) {
  print('Missing:')
  print(full_vars[!(full_vars %in% colnames(dta))])
}
